package com.keffect.effects;

/**
 * Interface for an animated effect.
 * 
 * @author Matias Varela
 *         <p>
 *         Student of Licenciatura en Ciencias de la Computacion, at the
 *         Universidad Nacional del Sur (Argentina).
 *         <p>
 *         project site: http://code.google.com/p/keffect-project/
 * 
 */
public interface Animated {

	/**
	 * Set the number of animation frames. An animation frame, is what paint the
	 * animation per every unit of time.
	 * 
	 * @param frames
	 */
	public void setFrames(long frames);


	/**
	 * Get the number of animation frames. An animation frame, is what paint the
	 * animation per every unit of time.
	 * 
	 * @return the number of animation frames
	 */
	public long getFrames();


	/**
	 * Set the duration time (in milliseconds) of the animation. When the
	 * animation starts running, once fulfilled the stipulated time it stops.
	 * The animation paint a frame every unit of time, all the frames will be
	 * painted along this <code>time</code>.
	 * 
	 * @param time
	 *            duration time (in milliseconds) of the animation.
	 */
	public void setDuration(long time);


	/**
	 * Implements the logic of the graphic effect.
	 */
	public void run();
}
